import java.util.Arrays;

public class Java_7 {
	public static void main(String[] args) {
		int a[] = new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 27, 27 };

		Arrays.sort(a);
		int b = 0;
		for (int i = 0; i < a.length; i++) {
			if (a[a.length - 1] == a[i]) {
				b++;
			}
		}
		System.out.println(a[a.length - 1 - b]);
	}
}
